﻿

#include "../utility/Singleton.h"

using namespace  SkyEngine2d;

//
class TestSingleton_1
	:public Singleton<TestSingleton_1>
{
	SINGLETON_CLASS(TestSingleton_1)
public:
	~TestSingleton_1() {}
	void test(){}
private:
	TestSingleton_1() {}
};


class TestSingleton_2
	:public Singleton<TestSingleton_2, false>
{
public:
	TestSingleton_2(){}
	~TestSingleton_2(){}
	void test(){}
};


int main()
{
	
#if 0
	TestSingleton_1::getInstance()->test();
#else
	TestSingleton_2* p = new TestSingleton_2;

	TestSingleton_2::getInstance()->test();

	delete p;
	p = nullptr;

#endif // 0

	return 0;
}


